package TestClass;
use strict;
use warnings;


my $global ;
sub new {
	my $class = shift;
	my $ref = {
		_num => shift,
		_name => shift,
		_value => shift,
	};
	bless $ref, $class;
	return $ref;
}
sub getName {
	my $ref = shift;
	return $ref->{_num};
}

sub setName {
	my ($ref, $name) = @_;
	$ref->{_name} = $name if defined ($name);
	return $ref->{_name};
}

sub dump {
	my $ref = shift;
	print "class TestClass : ";
    print "\%ref";
}

sub setG {
	$global = $_[1];
}
sub getG {
	return $global;
}

1;